import HttpUtils from '../../utils/http.utils';
const urls = {
	'userlist':globalConfig.apiPath.v1 + 'api/auth/v1/users/list',
    'userdelete':globalConfig.apiPath.v1 + 'api/auth/v1/users/',
    'createUser':globalConfig.apiPath.v1 + 'api/auth/v1/users',
    'updateUser':globalConfig.apiPath.v1 + 'api/auth/v1/users/',
    'queryById':globalConfig.apiPath.v1 + 'api/auth/v1/users/',
    'checkUser':globalConfig.apiPath.v1 + 'api/auth/v1/users/check',

}

function _getUserList(params={}){
	return HttpUtils.post(urls.userlist,params);
}

let UserSrv = {
	getUserList:function (params={}){
        return HttpUtils.post(urls.userlist,params);
    },
    deleteID:function (params={}){
        return HttpUtils.delete(urls.userdelete+params);
    },
    createUser:function (params={}){
        return HttpUtils.post(urls.createUser,params);
    },
    updateUser:function (params={}){
        return HttpUtils.post(urls.createUser+'/'+params.id,params);
    },
    queryByIdAPP1:function (params={}){
        return HttpUtils.get(urls.queryById+params.id);
    },
    checkUser:function (params={}){
        return HttpUtils.get(urls.checkUser,params);
    }
};

export {UserSrv};
